<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" src="{$smarty.const.__PUBLIC_JS__}/jquery-3.1.1.js"></script>

<script type="text/javascript">
    function get_role(id) {
    }

</script>
</head>
<body>
<!--<form id="list" method="post" action="{$smarty.const.__CONTROLLER__}/permission">
    <select name="send_value" onchange="get_role(this.id)">
        <option id="option2" value="2">普通管理员</option>
        <option id="option3" value="3">分销商</option>
    </select>
</form>-->
{$error}
<form method="post" action="{$smarty.const.__CONTROLLER__}/permission">
    <input hidden="hidden" name="send_value" value="2">
    <input type="submit" onclick="get_role('2')" value="普通管理员">
</form>
<form method="post" action="{$smarty.const.__CONTROLLER__}/permission">
    <input type="hidden" name="send_value" value="3">
    <input type="submit" onclick="get_role('3')" value="分销商">
</form>
<form id="form" method="post" action="{$smarty.const.__CONTROLLER__}/hold_data">
    <input type="hidden" name="role_id" id="role_id">
    {foreach $show_permission_par as $k => $v}
    <div>
        <input type="checkbox" name="auth_id[]" value="{$v.id}" {if in_array($v.id,$role_id) } checked='checked' {/if}>
        {$v.name}
    </div>
    {foreach $show_permission_son as $kk => $vv}
    {if $vv.pid == $v.id}
    <div style="padding-left: 20px;"><input type="checkbox" name="auth_id[]" value="{$vv.id}" {if
                                            in_array($vv.id,$role_id) } checked='checked' {/if}>{$vv.name}</a></div>
    {/if}
    {/foreach}
    {/foreach}

    <input type="submit" value="提交">
</form>
</body>
</html>